Repository navigation
fix(ci): pick the Rust fastled binary, not the Python entry-point shim - #65
Merged
Merged
Conversation
CI unit-tests + deploy job failed with
fastled: error: unrecognized arguments: --internal-ensure-fastled-repo
RuntimeError: fastled --internal-ensure-fastled-repo failed (exit 2)
because the previous \`_find_rust_fastled_cli()\` used \`shutil.which(\"fastled.exe\")\`,
which returns \`.venv/Scripts/fastled.exe\` — the Python entry-point shim
declared in \`[project.scripts]\`. That shim runs \`fastled.cli:main\` and rejects
the hidden plumbing flag.
Two callers (project_init.py, chrome_extension_downloader.py) had their own
copies of the buggy lookup; both now import a single helper from a new
\`fastled._rust_cli\` module. The new finder:
1. Walks the workspace \`target/{release,debug}/fastled[.exe]\` tree (dev).
2. Checks \`\$CARGO_HOME/bin\` and \`~/.cargo/bin\` (cargo binstall path).
3. Walks PATH manually, skipping any directory that hosts a python
interpreter (so the venv Scripts/bin dir is filtered out).
Locally: \`bash lint\` clean, 119 unit tests pass.
zackees
added a commit
that referenced
this pull request
May 13, 2026
PR #65 added a Python `_find_rust_fastled_cli` helper that locates the Rust binary by walking `target/{release,debug}/`, `$CARGO_HOME/bin`, and PATH (skipping Python venv dirs). On CI the helper now correctly skips the Python entry-point shim — but then returns `None` because the Rust binary is missing entirely: * `cargo binstall fastled-cli` fails (no release published yet). * `cargo test --workspace` (in `./test`) compiles the test binary into `target/<arch>/debug/deps/` but does not always produce the main bin output at `target/<arch>/debug/fastled[.exe]`. * The Build Webpage / deploy job never runs `cargo test` at all. So `Api.project_init` / `download_cpp_devtools_extension` fail with "Could not locate the fastled CLI binary" on every CI runner. Fix: when cargo-binstall does not supply a pre-built copy, fall back to `cargo build --release --bin fastled` inside `./install`. Both the unit-test and deploy jobs go through `./install`, so this covers both broken paths. Uses the local `_cargo` trampoline so the MSVC target is forced on Windows (matching where the existing helper searches). Local: `bash lint` clean, 119 unit tests pass.
3 of 4 tasks
zackees
added a commit
that referenced
this pull request
May 13, 2026
) PR #65 added a Python `_find_rust_fastled_cli` helper that locates the Rust binary by walking `target/{release,debug}/`, `$CARGO_HOME/bin`, and PATH (skipping Python venv dirs). On CI the helper now correctly skips the Python entry-point shim — but then returns `None` because the Rust binary is missing entirely: * `cargo binstall fastled-cli` fails (no release published yet). * `cargo test --workspace` (in `./test`) compiles the test binary into `target/<arch>/debug/deps/` but does not always produce the main bin output at `target/<arch>/debug/fastled[.exe]`. * The Build Webpage / deploy job never runs `cargo test` at all. So `Api.project_init` / `download_cpp_devtools_extension` fail with "Could not locate the fastled CLI binary" on every CI runner. Fix: when cargo-binstall does not supply a pre-built copy, fall back to `cargo build --release --bin fastled` inside `./install`. Both the unit-test and deploy jobs go through `./install`, so this covers both broken paths. Uses the local `_cargo` trampoline so the MSVC target is forced on Windows (matching where the existing helper searches). Local: `bash lint` clean, 119 unit tests pass.
This was referenced May 13, 2026
zackees
added a commit
that referenced
this pull request
May 13, 2026
Sweeps the non-Python items issue #59 flagged that are still on main after PRs #61, #62, #64, #65, #66, #68 cleaned up the Python side: * `entrypoint.sh` — Docker container entrypoint. Sourced `/emsdk/emsdk_env.sh` (container path) and called `fastled_wasm_compiler.cli_update_from_master` (a module from a separate package that only exists inside the container). * `compiler/run.py` — Docker compile-server entry point. Imports `fastled_wasm_compiler`, a separate package not in this repo. * `compiler/debug.sh` — instructed user to run from `/js` (container working directory). Empty `compiler/` directory removed. * `.dockerignore` — only contained cache exclusions (`**/.mypy_cache/`, `**/.ruff_cache/`) which belong in `.gitignore` if anywhere; no Docker build context this could serve. * `chrome_vscode_bridge_design_task.md` — one-off design draft that opens with "Here's a refined ... file for your repo. Feel free to adjust...". Zero references anywhere else. * `upload_package.sh` — manual PyPI upload helper, superseded by the automated `publish_release.yml` workflow. Zero inbound references. * Empty root-level `fastled/` directory left over from a prior layout. `lint` script updated to stop passing the (now-deleted) `compiler/` path to ruff / black / isort / pyright / the keyboard-interrupt checker. `bash lint` clean. `bash test` — 119 pass. Verified by grep across `*.py`, `*.rs`, `*.toml`, `*.yml`, `*.sh`, `*.md`, `Cargo.toml` (excluding `.venv/` and `.claude/worktrees/`): none of the deleted files are referenced from a live code path or workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #64 merged with a latent bug that surfaced as red CI on
main. The Python-side helpers (project_init.py,playwright/chrome_extension_downloader.py) usedshutil.which(\"fastled\")to locate the Rust binary for the new hidden plumbing flags (--internal-ensure-fastled-repo,--internal-ensure-chrome-extension).In CI (and in any normal editable install),
shutil.which(\"fastled\")returns the Python entry-point shim at.venv/Scripts/fastled.exedeclared in[project.scripts], NOT the Rust binary attarget/debug/fastled.exe. The shim runsfastled.cli:mainand rejects the hidden flag withfastled: error: unrecognized arguments: --internal-ensure-fastled-repo. Every unit-test job + thedeployjob failed with this exit-2 RuntimeError.Fix
New
src/fastled/_rust_cli.pymodule with a search order specifically designed to find the Rust binary, not the shim:target/{release,debug}/fastled[.exe](dev builds + CI aftercargo test).$CARGO_HOME/bin/fastled[.exe]and~/.cargo/bin/fastled[.exe](thecargo binstallinstall path).Scripts/bindir with the entry-point shim is filtered out).Both
project_init.pyandchrome_extension_downloader.pynow import this single helper; their inline finders are deleted.Test plan
bash lintclean (cargo check + clippy + rustfmt + ruff + black + isort + pyright)bash test— 119 passed, 1 skipped (includingtest_api.py::test_project_initwhich exercises the subprocess-to-Rust path end-to-end)unit-testanddeployjobs that failed onmainshould now passRefs #63, #64
🤖 Generated with Claude Code